After completing this lesson, you’ll be able to:
Webhook allows for an application to programmatically run a workspace. It does this by using a URL to listen for new data and allows the user to register a URL with the application or service which then pushes data to that URL whenever an event occurs. Any FME Workspace can be initiated from a URL with parameters and authentication by GET or POST requests. Workspaces run via Webhook URL have access to all the FME Flow Transformation Services, including the Job Submitter, Data Streaming, and Data Download services.
A Webhook URL will include all the workspace parameters directly in the URL itself. So, when the URL is triggered, it will immediately run the workspace without the need to prompt for those parameter values.
Webhooks are useful for building web applications that access FME Flow services because you can embed the HTTP request in your own website or a 3rd party application. You could also embed the URL into an email, or paste the URL directly into a web browser.
You can create a Webhook URL from the Run Workspace page for any workspace. Once you have selected your workspace to run, click on Workspace Actions > Create Webhook or go to the Advanced parameters and select Create a Webhook.
FME Flow automatically creates a new API token for every Webhook URL. The API token allows another application to run the workspace, and any other workspaces saved to the same repository, without an FME Flow account. Permissions are automatically restricted to the workspace repository and any dependencies, but this may be modified after creation.
After selecting Create Webhook, you can configure your Webhook. You can set an expiry time to control how long the URL will be active and decide what values should be filled in for any Published Parameters associated with the workspace.
The Webhook URL Preview contains all the required information to run a workspace from the web: the FME Flow domain, web service, repository, and workspace. Any parameters and their values follow in a query string.
When finished, your Webhook URL will be generated and you will be able to download a text file containing the Webhook information and see some examples of how to use the Webhook within 3rd party or custom applications.
The Authorization with Header webhook URL is more secure as it hides the token inside the call. The Authorization with Query String webhook URL includes the token in the Request URL of the call and is not recommended as the token is visible in the URL.
For more information, see these resources:
Webinar: [Webinar] Hook, Line, and Sinker: Reeling in ArcGIS Webhooks
Article: Working with FME and Webhooks
Documentation: Run Workspace